package itsm.isperp.module.repository.project;

import itsm.isperp.framework.data.domain.DataRequest;
import itsm.isperp.framework.data.domain.DataResponse;
import itsm.isperp.framework.data.mybatis.dao.CUDMapper;
import itsm.isperp.module.entity.project.ProjProjectService;
import itsm.isperp.module.entity.serviceCatalog.SrcService;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 项目服务数据映射器
 * 
 * @author lizx
 * @date 2013-3-2
 * @version V1.0
 */
@Repository
public interface ProjProjectServiceMapper extends CUDMapper<ProjProjectService> {

	/**
	 * 工具项目Id获取项目关联的服务
	 * 
	 * @param projectId
	 *            项目Id
	 * @return 项目关联服务实体列表 {@link ProjProjectService}
	 */
	public DataResponse<SrcService> findByProjectId(
			@Param("projectId") String projectId, DataRequest req);

	/**
	 * 根据项目Id删除项目管理的服务
	 * 
	 * @param projectId
	 *            项目id
	 */
	public void deleteByProjectId(@Param("projectId") String projectId);



	/**
	 * 查询项目可选的服务
	 * 
	 * @param projectId
	 *            项目Id
	 * @param req
	 *            数据请求
	 * @return 目关联服务实体列表 {@link VProjProjectService}
	 */
	public DataResponse<SrcService> findAllOptionalByRequest(
			@Param("projectId") String projectId, DataRequest req);

	public DataResponse<SrcService> findAllSrcService( DataRequest req);
}
